package com.khyr.controller;

import com.khyr.Vo.DateVo;
import com.khyr.Vo.RevenueAndExpenditureStatisticsVo;
import com.khyr.service.RevenueAndExpenditureStatisticsService;
import com.khyr.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author ：Zhang
 * @date ：Created in 2025/3/11 14:50
 * @description：收支统计
 * @modified By：
 * @version: 1.0
 */
@RestController
@RequestMapping("/accountant/raes")
public class RevenueAndExpenditureStatisticsController {

    @Autowired
    private RevenueAndExpenditureStatisticsService revenueAndExpenditureStatisticsService;
    @PostMapping("/select")
    public R<RevenueAndExpenditureStatisticsVo> select(@RequestBody DateVo dateRange){
        String[] time = dateRange.getDateRange();
        return revenueAndExpenditureStatisticsService.getRevenue(time);
    }
}
